<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;

class TopicComment extends Model
{
    use HasDateTimeFormatter;
    use SoftDeletes;

    protected $table = 'topic_comments';

    protected $fillable = ['member_id', 'topic_id', 'content', 'status'];

    public function topic()
    {
        return $this->belongsTo(Topic::class, 'topic_id', 'id');
    }

    public function member()
    {
        return $this->belongsTo(Member::class, 'member_id', 'id');
    }
}
